let [a, b, c] = [2, 3, 4]
//a=3,b=4,c=5
console.log(`a=${a},b=${b}c=${c}`);

let [d, , e] = [1, 2, 3];
// d=1,e=3,与位置相对应
console.log(`d=${d},e=${e}`);

//...是一个剩余符号,一把来说可以代替多参

let [f, ...g] = [1, 2, 3, 4, 5]
// f=1,g='2,3,4,5',g就是一个字符串
console.log(`f=${f},g=${g},${g == '2,3,4,5'}`);

let {
    animal,
    people
} = {
    animal: "cat",
    people: "lisi"
}
console.log(`animal=${animal},people=${people}`);